package com.pktechan.api.exception;

/**
 * @program: cloudfloating
 * @description: 登录拦截器
 * @author: qx.zhang
 * @create: 2021-03-08 15:55
 **/
public class CustomException extends RuntimeException {
    private String errCode;
    private String errMsg;

    public CustomException(String errMsg) {
        super(errMsg);
        this.errMsg = errMsg;
    }

    public CustomException(String errCode, String errMsg) {
        this.errCode = errCode;
        this.errMsg = errMsg;
    }

    public CustomException(Exception e) {
        super(e);
        this.errCode = "9999";
        this.errMsg = e.getMessage();
    }

    public CustomException(String errMsg, Exception e) {
        super(errMsg, e);
    }

    public String getErrCode() {
        return errCode;
    }

    public String getErrMsg() {
        return errMsg;
    }
}
